import type { RouteRecordRaw } from 'vue-router'

const shopRoutes: RouteRecordRaw[] = [
  {
    path: '/shop',
    name: 'Shop',
    component: () => import('@/layout/index.vue'),
    redirect: '/shop/management',
    meta: {
      title: '店铺管理',
      icon: 'shop',
      order: 8,
      requiresAuth: true
    },
    children: [
      {
        path: 'management',
        name: 'ShopManagement',
        component: () => import('@/views/region/shop/index.vue'),
        meta: {
          title: '店铺信息',
          icon: 'shop',
          requiresAuth: true,
          permissions: ['region:shop:list']
        }
      },
      {
        path: 'owner',
        name: 'ShopOwner',
        component: () => import('@/views/region/shop-owner/index.vue'),
        meta: {
          title: '店铺业主',
          icon: 'user',
          requiresAuth: true,
          permissions: ['region:shop-owner:list']
        }
      },
      {
        path: 'rent',
        name: 'ShopRent',
        component: () => import('@/views/region/shop-rent/index.vue'),
        meta: {
          title: '租金管理',
          icon: 'money',
          requiresAuth: true,
          permissions: ['region:shop-rent:list']
        }
      },
      {
        path: 'fee',
        name: 'ShopFee',
        component: () => import('@/views/region/shop-fee/index.vue'),
        meta: {
          title: '费用管理',
          icon: 'money-collect',
          requiresAuth: true,
          permissions: ['region:shop-fee:list']
        }
      },
      {
        path: 'fee-standard',
        name: 'ShopFeeStandard',
        component: () => import('@/views/region/shop-fee-standard/index.vue'),
        meta: {
          title: '费用标准',
          icon: 'setting',
          requiresAuth: true,
          permissions: ['region:shop-fee-standard:list']
        }
      }
    ]
  }
]

export default shopRoutes
